/*
 * (C) 2012	Sheng Yi
 * link and unlink a file, just like hard link in linux
 */

#include "apue.h"
#include <fcntl.h>

int main(int argc, char *argv[])
{
	/* to link a file */
	if (argc != 3)
		err_quit("usge: a.out existpath newpath");
	if (link(argv[1], argv[2]) != 0)
		err_quit("link error");

	return 0;
}
